Skip to content

PageProps Type Errors in Next.js #142577

Discussion options

You must be logged in to vote

Hi @Universe0809,
It appears that there are breaking changes in Next.js version 15 related to properties such as params. The official documentation highlights this issue (see: Next.js v15 Upgrade Guide).

To address these changes, you have a couple of options:

  1. Downgrade: Consider reverting to an earlier version of Next.js where these breaking changes do not apply.
  2. Update your Code: You can handle the params by awaiting them in your function as follows:
    `type Params = Promise<{ slug: string[] }>;

export default async function Page({ params }: { params: Params }) {
const { slug } = await params;
}`

This approach ensures that your application remains compatible with the latest version of Ne…

Replies: 21 comments 40 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
24 replies
@dev-eneandre
Comment options

@sadsisadsj
Comment options

@sadsisadsj
Comment options

@dhanushd-27
Comment options

@ayush-khatrii
Comment options

Answer selected by Universe0809
Comment options

You must be logged in to vote
4 replies
@suhailkhan123517
Comment options

@theognd
Comment options

@soosho
Comment options

@byleonardlim
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@7kylor
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mic-andrew
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ss-sathya
Comment options

Comment options

You must be logged in to vote
1 reply
@ss-sathya
Comment options

Comment options

You must be logged in to vote
6 replies
@ss-sathya
Comment options

@danielgrahamboaz
Comment options

@izunwaonu
Comment options

@izunwaonu
Comment options

@ss-sathya
Comment options

Comment options

You must be logged in to vote
1 reply
@ss-sathya
Comment options

Comment options

You must be logged in to vote
1 reply
@ss-sathya
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GitHub or a GitHub feature is not working as intended Codespaces Your development environment, in the cloud. Run VS Code and code on GitHub's cloud platform,